home *** CD-ROM | disk | FTP | other *** search
- #include <libraries/feelin.h>
-
- #include <proto/exec.h>
- #include <proto/dos.h>
- #include <proto/feelin.h>
-
- struct FeelinBase *FeelinBase;
-
- struct LocalObjectData
- {
- FObject Editor;
- };
-
- ///App_New
- F_METHOD(ULONG,App_New)
- {
- struct LocalObjectData *LOD = F_LOD(Class,Obj);
-
- return F_SuperDo(Class,Obj,Method,
-
- Child, LOD -> Editor =
-
- F_NewObj(FC_PreferenceEditor, FA_Window_Open, TRUE, TAG_DONE),
-
- TAG_MORE, Msg);
- }
- //+
- ///App_ClosePrefs
- F_METHOD(void,App_ClosePrefs)
- {
- F_Set(Obj,FA_Application_Sleep,TRUE);
-
- /* There is a timing problem between pushed methods, DOS notification and
- preference handling. Until I find something better, waiting a second is a
- simple (still BAD) solution to avoid semaphore inter-locking. */
-
- Delay(50);
- F_Do(Obj,FM_Application_Shutdown);
- }
- //+
-
- ///Main
- void main(void)
- {
- struct FeelinMethodEntry MTable[] =
- {
- (FMethod) App_New, NULL, FM_New,
- (FMethod) App_ClosePrefs, NULL, FM_Application_ClosePrefs,
- NULL
- };
-
- struct FeelinClass *Class;
- FObject app;
-
- if (FeelinBase = (APTR) OpenLibrary("feelin.library",FV_VERSION))
- {
- if (Class = F_CreateClass(FA_Class_Super, FC_Application,
- FA_Class_LODSize, sizeof (struct LocalObjectData),
- FA_Class_MethodsTable, MTable,
- TAG_DONE))
- {
- app = F_NewObj(Class -> Name,
- FA_Application_Title, "PreferenceEditor",
- FA_Application_Version, "$VER: Preference Editor 1.00 (2003/08/18)",
- FA_Application_Copyright, "©2000 - 2003, Olivier LAVIALE",
- FA_Application_Author, "Olivier LAVIALE <gofromiel@numericable.com>",
- FA_Application_Description, "Configure GUI",
- End;
-
- if (app)
- {
- F_Do(app,FM_Application_Run);
- F_DisposeObj(app);
- }
-
- F_DeleteClass(Class);
- }
-
- CloseLibrary(FeelinBase);
- }
- else Printf("Unable to open feelin.library v%ld\n",FV_VERSION);
- }
- //+
-